<?php $this->placeholder('form')->captureStart(); ?>

<ul id="abas" class="tabs js-tabs same-height">
    <li class="current"><a href="#tab-data">Conte&uacute;do</a></li>
    <li><a href="#tab-leiamias">Leia mais</a></li>
    <li><a href="#tab-file">Arquivo</a></li>
</ul>

<div class="tabs-content" style="padding-bottom:0; margin-bottom:15px;">
    <div id="tab-data" class="tabs">
        <fieldset>
            <?php echo $this->form->getElement('lcl_id'); ?>

            <div class="columns">
                <div class="colx2-left required">
                    <label for="reg_id" class="required">Regi&atilde;o:</label>
                    <?php echo $this->form->getElement('reg_id'); ?>
                </div>

                <div class="colx2-right required">
                    <label for="lcl_titulo" class="required">T&iacute;tulo:</label>
                    <?php echo $this->form->getElement('lcl_titulo'); ?>
                </div>
            </div>
           
            <p>
                <span class="relative">
                    <label for="lcl_descricao">Descri&ccedil;&atilde;o:</label>
                    <?php echo $this->form->getElement('lcl_descricao'); ?>
                </span>
            </p>
             <p>
                <span class="relative">
                    <label for="lcl_titulo" >Destaque:</label>
                    <?php echo $this->form->getElement('lcl_destaque'); ?>
                </span>
            </p>
        </fieldset>
    </div>
    <div id="tab-leiamias" class="tabs">
        <fieldset>
            <p>
                <span class="relative">
                    <label for="lcl_leiamais">Leia mais:</label>
                    <?php echo $this->form->getElement('lcl_leiamais'); ?>
                </span>
            </p>
        </fieldset>
    </div>

    <div id="tab-file" class="tabs">

        <fieldset>
            <table class="files">
                <thead>
                    <tr>
                        <th>Arquivo</th>
                        <th style="width:1%;">&nbsp;</th>
                    </tr>
                </thead>

                <tbody id="files">
                    <?php 
                    $lstTitle = array(
                        0 => 'Capa',
                        1 => 'Topo',
                        2 => 'Diversas',
                        3 => 'Diversas',
                        4 => 'Diversas'
                    );
                    for ($i = 0; $i < 5; $i++): 
                        
                        if(empty($this->image[$i]['id'])){
                            $this->image[$i]['id'] = 0;
                        }
                        $strTitulo = $lstTitle[$i];
                        ?>
                        <tr>
                            <td><?php echo $strTitulo ;?></td>
                            <td>
                                
                                <span class="input-type-text container-upload">
                                    <input type="text" class="desc-file" />
                                    <img width="16" height="16" src="<?php echo $this->baseUrl('public/images/admin/icons/fugue/magnifier.png'); ?>" />
                                </span>

                                <?php
                                
                                echo $this->form->getElement('img_id')
                                        ->setAttrib('id', 'img_id' . $i)
                                        ->setValue($this->image[$i]['id']);

                                echo $this->form->getElement('imagem')
                                        ->setAttrib('id', 'imagem' . $i);
                                ?>
                            </td>
                            <td>&nbsp;</td>
                        </tr>
                    <?php endfor; ?>
                </tbody>
            </table>
        </fieldset>

    </div>
</div>

<?php $this->placeholder('form')->captureEnd(); ?>

<iframe name="upload_target" onLoad="callBackUpload( this );" id="upload_target"></iframe>

<?php echo $this->form($this->form->getId(), $this->form->getAttribs(), $this->placeholder('form')); ?>